using System;
using System.Collections.Generic;
using System.Text;

namespace SmartContentDB.Interfaces
{
    public class Content
    {
        #region Enum
        public enum ContentType
        {
            Cab,
            File
        }
        #endregion

        #region Variables
        private int id;
        private int parentId;
        private string name;
        private string desc;
        private string tableName;
        private ContentType type;
        private string directory;
        private UserRight[] rights;
        #endregion

        #region Constructor
        public Content()
        {
            this.id = 0;
            this.name = null;
            this.desc = null;
            this.type = ContentType.Cab;
            this.rights = null;
        }
        public Content(int id, string name, string desc, ContentType type, string tableName, string dir)
        {
            this.id = id;
            this.name = name;
            this.desc = desc;
            this.type = type;
            this.tableName = tableName;
            this.directory = dir;
            this.rights = null;
        }
        public Content(int id, int parentId, string name, string desc, ContentType type, string tableName, string dir)
        {
            this.id = id;
            this.parentId = parentId;
            this.name = name;
            this.desc = desc;
            this.type = type;
            this.tableName = tableName;
            this.directory = dir;
            this.rights = null;
        }
        #endregion

        #region Set/Get
        public int getId()
        {
            return id;
        }
        public string getName()
        {
            return name;
        }
        public string getDescription()
        {
            return desc;
        }
        public string getDirectory()
        {
            return directory;
        }
        public ContentType getType()
        {
            return type;
        }
        public string getTableName()
        {
            return tableName;
        }
        public int getParent()
        {
            return this.parentId;
        }
        public UserRight[] Rights
        {
            set { this.rights = value; }
            get { return this.rights; }
        }
        public void setName(string name)
        {
            this.name = name;
        }
        public void setDescription(string desc)
        {
            this.desc = desc;
        }
        public void setDirectory(string dir)
        {
            this.directory = dir;
        }
        #endregion
    }
}
